package com.woniuxy.dao;

import com.woniuxy.entity.Equipment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface EquipmentDao {
    //通过条件查询设备信息分页展示
    List<Equipment> selectEquipmentByCondition(@Param("Equipment") Equipment equipment ,
                                               @Param("pageIndex") int pageIndex, @Param("pageSize") int pageSize);

    //查询到的数据条数
    int selectEquipmentCount( @Param("Equipment") Equipment equipment );

    //通过种类查询设备
    List<Equipment> selectEquipmentByCategory(@Param("Equipment") Equipment equipment ,
                                               @Param("pageIndex") int pageIndex, @Param("pageSize") int pageSize);

    //通过设备种类查询到的数据条数
    int selectEquipmentCountByCategory( @Param("Equipment") Equipment equipment );

    //通过输入条件查询设备
    Equipment selectEquipment(Equipment equipment);

    //通过输入设备名字查询设备
    List<Equipment> selectEquipmentByName(Equipment equipment);

    //添加设备
    void appendEquipment(Equipment equipment);

    //修改设备数量
    void changeCount(@Param("equipmentId")int equipmentId,@Param("count")int count);
}